With the development of digital cameras, more cameras are applied to the video surveillance field, the video conference field, and the like. Because cameras are installed in different environments, working temperatures are different. In addition, a working time of a camera also causes a change in an internal temperature of the camera. The change of the temperature of the camera affects imaging quality of an optical system. Generally, the impact is mainly reflected in three aspects: (1) the temperature change causes a change in a medium refractive index; (2) the temperature change causes a change in a curvature radius and a central thickness of a refracting surface of an optical element; and (3) the temperature change causes a change in an interval between optical elements in the optical system. If a change caused by a temperature is not appropriately compensated for, imaging quality will be greatly affected. Therefore, how to perform temperature compensation for a camera becomes a problem urgently needing to be resolved.
A method already exists in the prior art: when a temperature changes, a position to which a focusing lens is moved according to the temperature change is calculated, and it is determined whether compensation is performed for the position to which the focusing lens is moved. In the method, the position to which the focusing lens is moved is calculated based on a ratio of a distance between a position of the focusing lens in a previous state and a Charge-coupled Device (CCD), which may also be referred to as a CCD image sensor, to a distance between a reference position and the CCD and information related to movement displacement relative to the reference position.
In a process of implementing the present disclosure, the inventor finds that in the prior art, when temperature compensation is performed for a focusing lens, calculation needs to be performed by depending on an absolute distance between the focusing lens and a CCD. However, because the focusing lens and the CCD are packaged in a lens cone, it is hard to measure the distance and an accuracy requirement is very high; therefore, practicability of the method is not high.